package com.hu.config.redis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;

public abstract class RedisCache {
    @Autowired
    private StringRedisTemplate redisTemplate;

    public abstract Object get(String key);

    public abstract void set(String key, Object obj);

    public void deleteByKey(String key) {
        redisTemplate.delete(key);
    }
}
